package com.web.base.user.message;

import com.blue.core.dict.State;
import com.blue.core.dict.Type;
import com.blue.validation.group.SaveModel;
import com.blue.validation.group.UpdateModel;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

/**
 * 银行卡请求内容
 * 
 * @author 代码由 blue-code 框架生成
 * @since 1.0 2018年06月26日
 */
 public class BankCardRequest implements Serializable
{
	private static final long serialVersionUID = 1L;
	
	@NotNull(groups = { UpdateModel.class }, message = "编号不能为空")
	@Null(groups={SaveModel.class}, message="编号必须为空")
	private Integer id; // 编号
	@NotNull(groups = { SaveModel.class }, message = "用户编号不能为空")
	private Integer userId; // 用户编号
	@NotNull(groups = { SaveModel.class }, message = "银行编号不能为空")
	private Integer bankId; // 银行编号
	@NotBlank(groups = { SaveModel.class }, message = "正面图片不能为空")
	@Size(min = 0, max = 100, groups = { SaveModel.class, UpdateModel.class }, message = "正面图片长度[0-100]")
	private String facePic; // 正面图片
	@NotBlank(groups = { SaveModel.class }, message = "背面图片不能为空")
	@Size(min = 0, max = 100, groups = { SaveModel.class, UpdateModel.class }, message = "背面图片长度[0-100]")
	private String backPic; // 背面图片
	@NotBlank(groups = { SaveModel.class }, message = "拥有人不能为空")
	@Size(min = 0, max = 20, groups = { SaveModel.class, UpdateModel.class }, message = "拥有人长度[0-20]")
	private String owner; // 拥有人
	@NotBlank(groups = { SaveModel.class }, message = "持卡人手机不能为空")
	@Size(min = 0, max = 20, groups = { SaveModel.class, UpdateModel.class }, message = "持卡人手机长度[0-20]")
	private String mobile; // 持卡人手机
	@NotBlank(groups = { SaveModel.class }, message = "卡号不能为空")
	@Size(min = 0, max = 20, groups = { SaveModel.class, UpdateModel.class }, message = "卡号长度[0-20]")
	private String bankNo; // 卡号
	@NotNull(groups = { SaveModel.class }, message = "有效日期不能为空")
	private Date expireDate; // 有效日期
	private State state; // 状态：0正常，1作废
	private Type auth; // 是否认证：0否，1是
	
	public BankCardRequest()
	{
	}
	
	public Integer getId()
	{
		return this.id;
	}
	
	public void setId(Integer id)
	{
		this.id = id;
	}
	
	public Integer getUserId()
	{
		return this.userId;
	}
	
	public void setUserId(Integer userId)
	{
		this.userId = userId;
	}
	
	public Integer getBankId()
	{
		return this.bankId;
	}
	
	public void setBankId(Integer bankId)
	{
		this.bankId = bankId;
	}
	
	public String getFacePic()
	{
		return this.facePic;
	}
	
	public void setFacePic(String facePic)
	{
		this.facePic = facePic;
	}
	
	public String getBackPic()
	{
		return this.backPic;
	}
	
	public void setBackPic(String backPic)
	{
		this.backPic = backPic;
	}
	
	public String getOwner()
	{
		return this.owner;
	}
	
	public void setOwner(String owner)
	{
		this.owner = owner;
	}
	
	public String getMobile()
	{
		return this.mobile;
	}
	
	public void setMobile(String mobile)
	{
		this.mobile = mobile;
	}
	
	public String getBankNo()
	{
		return this.bankNo;
	}
	
	public void setBankNo(String bankNo)
	{
		this.bankNo = bankNo;
	}
	
	public Date getExpireDate()
	{
		return this.expireDate;
	}
	
	public void setExpireDate(Date expireDate)
	{
		this.expireDate = expireDate;
	}

	public State getState()
	{
		return state;
	}

	public void setState(State state)
	{
		this.state = state;
	}

	public Type getAuth()
	{
		return auth;
	}

	public void setAuth(Type auth)
	{
		this.auth = auth;
	}
}
